<tagLib name="html" />
{$header}<div id="main" class="main" >
<!-- 主体内容  -->
<div class="content" >
  
<!--  功能组区域  -->
<div class="btn-toolbar">
  <button class="btn btn-primary" onclick="selectpro()"> 选择产品 </button>
          <form class="search-form pull-right" method='get' action="__URL__/search">
              <input type="text" class="search-query span4" name="keywords" <notempty name='_REQUEST.keywords'>
                    <php>echo 'value="'.urldecode($_REQUEST['keywords']).'"'</php><else/>
                    placeholder="搜索"
                </notempty>
                >
                <notempty name="_REQUEST.trtype">
                    <input type="hidden" name="trtype" value="{$_REQUEST.trtype}">
                </notempty>
                <input type="submit" class="btn btn-primary" value="搜索">

  <button class="btn offset1 btn-primary" onclick="selectpro()"> 选择产品 </button>
          </form>
  </div>
<!-- 功能组区域结束 -->
<php>
    function getCateName($cat_id=0){
        return getModelName($cat_id,'Category');
    }
    function getUnitName($cat_id=0){
        return getModelName($cat_id,'Unit');
    }
</php>
<!-- 列表显示区域  -->
<div class="list" >
<div id="result" class="result none"></div>
<table class="table table-bordered table-striped" id="checkList">
<tr>
  <th width="8"><input type="checkbox" id="check" onclick="CheckAll('checkList')"> </th>
  <th width="5%"><a href="javascript:sortBy('id','1','search',".urldecode($_REQUEST['keywords'])."'" title="按照编号升序排列 ">编号</a>
  </th>
  <th>
    <a href="javascript:sortBy('name','1','search',".urldecode($_REQUEST['keywords'].")" title="按照名称升序排列 ">名称</a>
  </th>
  <th>
    <a href="javascript:sortBy('unit_id','1','search','海昌 彩片')" title="按照单位升序排列 ">单位</a>
  </th>
  <!--
  <th>
    <a href="javascript:sortBy('cost_default','1','search','海昌 彩片')" title="按照默认进价升序排列 ">默认进价</a>
  </th>
  <th>
    <a href="javascript:sortBy('wholesale_price_default','1','search','海昌 彩片')" title="按照默认进价升序排列 ">默认批发价</a>
  </th>
  <th>
    <a href="javascript:sortBy('sale_price_default','1','search','海昌 彩片')" title="按照默认进价升序排列 ">默认销售价</a>
  </th>
-->
  
</tr>
<volist name="list" id="vo">
  <tr>
    <td><input type="checkbox" value='{$vo.id}' name="key" ></td>
    <td>{$vo.id}</td>
    <td><a href="javascript:edit('{$vo.id}')">{$vo.name}</a></td>
    <!--
    <td>{$vo.helpword}</td>
    <td>{$vo.tm}</td> -->
    <td>{$vo.unit_id|getUnitName}</td>
    <!--
    <td>{$vo.cost_default}</td>
    <td>{$vo.wholesale_price_default}</td>
    <td>{$vo.sale_price_default}</td> -->
    
  </tr>
</volist>
</table>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>

<!-- 主页面结束 --><include file="Public:footer"/>
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
<script type="text/javascript" language="javascript">
  function selectpro(){
	var keyValue = getSelectCheckboxValues();
	if (!keyValue)
	{
		alert('请选择货品！');
		return false;
	}
      window.opener.showMassDetail(keyValue,'{$_REQUEST.trtype}');
      window.close(); 
      return false;
}
  
</script>
